package cn.tedu.spring.bean;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;

@Service
public class UserService {
    @Value("登录功能")
    private String name;
    @Autowired
    /*自动装配1.(对象或接口类型)
    2.添加位置：
        2.1:属性上
        2.2:set方法上
        2.3:构造方法上
     */
    private UserDao userDao;

    @Override
    public String toString() {
        return "UserService{" +
                "name='" + name + '\'' +
                ", userDao=" + userDao +
                '}';
    }
}
